<%@page contentType="text/html; charset=UTF-8"%>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@ page import="com.ufida.ebscg.comm.session.UserBean" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>招商银行供应商门户-采购创造价值_友情链接</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link href="css/common.css" rel="stylesheet" type="text/css" />

</head>

<body>
   <% 
   UserBean useBean=(UserBean)session.getAttribute("EBSCG_SESSION_ID_");   
%>



<table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
	<td width="100%" style="color:red; font-weight:14px">
	${message }
	</td>
</tr>
</table>

<form action="modify.do" method="post" name="modifypassword">

<input type="hidden" value="1" name="type" />
<div id="main" class="password">
<table width="300" border="1" align="center">
  <tr>
    <td width="74">用&nbsp;&nbsp;户&nbsp;&nbsp;名：</td>
    <td width="110"><%=useBean.getTempUsername() %></td>
  </tr>
  <tr>
    <td>原&nbsp;&nbsp;密&nbsp;&nbsp;码：</td>
    <td><input name="oldpassword" type="password" size="20"  value=""/></td>
  </tr>
  <tr>
    <td>新&nbsp;&nbsp;密&nbsp;&nbsp;码：</td>
    <td><input name="password" type="password" size="20" /></td>
  </tr>
  <tr>
    <td>确认新密码：</td>
    <td><input name="password1" type="password" size="20" /></td>
  </tr>
</table>

<table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="40" align="center"><img src="../images/botton_submit.jpg" width="60" height="20" border="0" onclick="submitValue()" style="cursor:hand"/> &nbsp;<img src="../images/botton_cancellation .jpg" width="60" height="20" border="0" onclick="resetValue()" style="cursor:hand"/></td>
  </tr>
</table>


</div>
</form>
<!--页面主体内容结束-->


<script language="javascript" >

function submitValue()
{
	if(document.modifypassword.oldpassword.value.replace(/(^\s*)|(\s*$)/g, "") != "")
	{
		if(document.modifypassword.oldpassword.value != '<%=useBean.getTempPassword()%>')
		{
			alert("原密码输入不正确!");
			return;
		}
	}else{
		alert("原密码不能为空!");
		return;
	}
	if(document.modifypassword.password.value.replace(/(^\s*)|(\s*$)/g, "") != "")
	{
		if(document.modifypassword.password1.value != "")
		{
			if(document.modifypassword.password.value != document.modifypassword.password1.value)
			{
				alert("请注意密码的一致性!");
				return;
			}
		}else{
			return;
		}
	}else{
		alert("密码不能为空!");
		return;
	}
	
	document.modifypassword.submit();
}

function resetValue()
{
	document.modifypassword.reset();
}
</script>
</body>
</html>
